home *** CD-ROM | disk | FTP | other *** search
- Path: news.compuserve.com!newsmaster
- From: <75151.03563@compuserve.com>
- Newsgroups: comp.lang.c++
- Subject: re: What to use instead of strtok
- Date: 4 Jan 1996 18:08:45 GMT
- Organization: CompuServe Incorporated
- Message-ID: <4ch53d$he@dub-news-svc-3.compuserve.com>
- NNTP-Posting-Host: ad48-134.compuserve.com
- Content-Type: text/plain
- Content-length: 579
- X-Newsreader: AIR Mosaic (16-bit) version 3.10.08.25
-
-
- > In C I used strtok to parse a comma-delimited string. What is the
- > best way for C++. Comething with streams ?
-
- I don't know about strings. strtok() still works, but I would get a hold of
- a good String class that has member functions for doing this sort of
- thing. If you are using MFC, the CString class has members for finding
- characters and substrings and performing the extractions. If not, a little
- digging will probably net you a good class - or you could write your own
- class to enapsulate the parsing of the CSV string.
-
- TomK
- 75151,03563@compuserve.com
-
-